Skip to content

chore(security): Potential fix for code scanning alert no. 1: Workflow does not contain permissions#2

Merged
atdi merged 2 commits intomainfrom
alert-autofix-1
Nov 4, 2025
Merged

chore(security): Potential fix for code scanning alert no. 1: Workflow does not contain permissions#2
atdi merged 2 commits intomainfrom
alert-autofix-1

Conversation

@atdi
Copy link
Copy Markdown
Collaborator

@atdi atdi commented Nov 4, 2025

Potential fix for https://github.com/aagsolutions/teltonika-codec/security/code-scanning/1

To resolve the issue, you should set the permissions key with the least privilege required for the workflow. Since the workflow checks out code and runs a release step, but the shown steps do not directly require write access (e.g., to create releases on the GitHub UI), a bare minimum of contents: read is recommended. You can add this block either at the workflow root (applies to all jobs unless overridden), or inside the build job (applies just to that job). For clarity and maintainability, setting it at the workflow root is preferred unless specific jobs need escalation. This involves inserting:

permissions:
  contents: read

at line 2 (after the name: and before on:).

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

atdi and others added 2 commits November 4, 2025 10:32
…w does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@atdi atdi marked this pull request as ready for review November 4, 2025 09:35
@atdi atdi changed the title Potential fix for code scanning alert no. 1: Workflow does not contain permissions chore(security): Potential fix for code scanning alert no. 1: Workflow does not contain permissions Nov 4, 2025
@atdi atdi merged commit ca89e98 into main Nov 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant